<%--
  出入库明细
  User: Ivan
  Date: 2019-04-19 23:52
--%>
<style type="text/css">
tr, th, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/PartTotal/outInLotDetail"
          method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="${SYS_QUERY_NAME}"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <label>时间段<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="startTime" class="form-control" data-toggle="datepicker" data-pattern="yyyy-MM-dd"
                   size="11" id="start-date-input" value="${startTime}"/>&nbsp;
            <input type="text" name="endTime" class="form-control" data-toggle="datepicker" data-pattern="yyyy-MM-dd"
                   size="11" id="end-date-input" value="${endTime}"/>&nbsp;
            <label>入库类别：</label>
            <g:textField name="shipType" value="${shipType}" size="16" placeholder="入库类别"/>&nbsp;
            <label>产品图号：</label>
            <g:textField name="partTuId" value="${partTuId}" size="16" placeholder="产品图号"/>&nbsp;
            <label>物料编码：</label>
            <g:textField name="materielCode" value="${materielCode}" size="16" placeholder="物料编码"/>
            <br/><br/>
            <label>存货代码/图号：</label>
            <g:textField name="stockCode" value="${stockCode}" size="20" placeholder="存货代码/图号"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <a type="button" class="btn btn-blue" href="${request.getContextPath()}/ExportExcel/expExcel"
               data-toggle="doexport" data-confirm-msg="确定要导出吗？" data-icon="file-excel-o" title="导出Excel">导出</a>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${report_011.size() > 0}">
        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <th width="50">NO.</th>
                <g:each in="${tableHeadList}" status="i" var="headInstance">
                    <g:if test="${headInstance != 'RN'}">
                        <g:if test="${headInstance != 'STATE'}">
                            <th><g:message code="${headInstance}" default="${headInstance}"/></th>
                        </g:if>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:each in="${report_011}" status="i" var="dataInstance">
                <tr>
                    <td>${dataInstance.RN}</td>
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <g:if test="${headInstance != 'RN'}">
                            <g:if test="${headInstance != 'STATE'}">
                            <td>
                                <g:if test="${headInstance == "入库数量"}">
                                    <a href="${request.getContextPath()}/PartTotal/outInLotStockDetail?clazz=INSTOCK&state=<%=dataInstance.STATE %>&materielCode=<%=dataInstance.物料编号%>&startTime=<%=dataInstance.发生日期%>"
                                       data-toggle="navtab" data-id="dialog-normal"
                                       data-options="{id:'outInLotStockDetail', title:'出入库批次明细'}">
                                        ${dataInstance["${headInstance}"]}
                                    </a>
                                </g:if>
                                <g:elseif test="${headInstance == "出库数量"}">
                                    <a href="${request.getContextPath()}/PartTotal/outInLotStockDetail?clazz=OUTSTOCK&outQty=<%=dataInstance.出库数量 %>&state=<%=dataInstance.STATE %>&materielCode=<%=dataInstance.物料编号%>&startTime=<%=dataInstance.发生日期%>"
                                       data-toggle="navtab" data-id="dialog-normal"
                                       data-options="{id:'outInLotStockDetail', title:'出入库批次明细'}">
                                        ${dataInstance["${headInstance}"]}
                                    </a>
                                </g:elseif>
                                <g:else>
                                    ${dataInstance["${headInstance}"]}
                                </g:else>
                            </td>
                            </g:if>
                        </g:if>
                    </g:each>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/pagination"/>